interface ILength {
    length: number
}

function getLength<T extends ILength>(arg: T) {
    return arg.length
}

getLength('123')
getLength(['q23','3124'])
getLength({length: 4})
